package com.itheima.pinda.web.base;

import com.itheima.pinda.entity.truck.PdTruckType;
import com.itheima.pinda.service.PdTruckTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author llhuang10
 * @date 2021/9/29 16:29
 */
@Api(tags = "车辆类型管理")
@RestController
@RequestMapping("/base/truckTypes")
public class PdTruckTypeController {


    @Resource
    private PdTruckTypeService truckTypeService;


    @GetMapping
    @ApiOperation("获取所有车辆类型")
    public List<PdTruckType> getAll() {
        return truckTypeService.list();
    }
}
